package com.example.administrator.myapplication.find.recommend.bean.recommendEntity;

import android.databinding.ObservableInt;
import android.support.v4.view.PagerAdapter;

import com.example.administrator.myapplication.BR;
import com.example.administrator.myapplication.R;
import com.example.administrator.myapplication.until.CommentPagerAdapter;
import com.google.gson.annotations.Expose;

import java.util.List;
import java.util.Observable;

/**
 * Created by Administrator on 2017.1.29.
 */

public class FocusImages {
    private int ret;

    private List<FocusImagesData> list ;

    private String title;
    @Expose(serialize = false,deserialize = false)
    private PagerAdapter adapter;
    @Expose(serialize = false,deserialize = false)
    private ObservableInt pager = new ObservableInt(0);

    public PagerAdapter getAdapter() {
        if(adapter==null){
            adapter = new CommentPagerAdapter<>(list, R.layout.recommend_focus_image, BR.focusImage);
        }
        return adapter;
    }

    public void setAdapter(PagerAdapter adapter) {
        this.adapter = adapter;
    }

    public ObservableInt getPager() {
        return pager;
    }

    public void setPager(ObservableInt pager) {
        this.pager = pager;
    }

    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
    }

    public List<FocusImagesData> getList() {
        return list;
    }

    public void setList(List<FocusImagesData> list) {
        this.list = list;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
